#include <iostream>
#include <cstdio>
#include <vector>
#include <string>
#include <algorithm>
#include <cstring>
#include <iomanip>
#include <cmath>
using namespace std;
#define ldb long double
#define ll long long
#define mp(a, b) make_pair(a, b)
#define pb(a) push_back(a)
#define ff first
#define ss second
#define nextLine() {int c = 0; while ((c = getchar()) != 10 && c != EOF); }
const ldb pi = fabsl(atan2l(0.0, -1.0));
const ldb eps = 1e-9;
const int inf = 1 << 28;


void load()
{
	int x, y, z, k;
	cin >> x >> y >> z >> k;
	ll res = 0;
	for (int i = 0; i < x; i++)
	{
		for (int j = 0; j < y && i + j <= k; j++)
		{
			for (int l = 0; l < z && i + j + l <= k; l++)
			{
				res = max(res, (ll)(i + 1) * (ll)(j + 1) * (ll)(l + 1));
			}
			
		}}

		cout << res;
}

void solve()
{

}

#define file "a"

int main()
{
	#ifndef ONLINE_JUDGE
		freopen(file".in", "rt", stdin);
		freopen(file"2.out", "wt", stdout);
  	#endif
  	load();
  	solve();
  	return 0;
}
